cmake_minimum_required(VERSION 2.6)

# On Visual Studio 8 MS deprecated C. This removes all 1.276E1265 security
# warnings
IF(WIN32)
  IF(NOT BORLAND)
    IF(NOT CYGWIN)
      IF(NOT MINGW)
        IF(NOT ITK_ENABLE_VISUAL_STUDIO_DEPRECATED_C_WARNINGS)
          ADD_DEFINITIONS(
            -D_CRT_FAR_MAPPINGS_NO_DEPRECATE
            -D_CRT_IS_WCTYPE_NO_DEPRECATE
            -D_CRT_MANAGED_FP_NO_DEPRECATE
            -D_CRT_NONSTDC_NO_DEPRECATE
            -D_CRT_SECURE_NO_DEPRECATE
            -D_CRT_SECURE_NO_DEPRECATE_GLOBALS
            -D_CRT_SETERRORMODE_BEEP_SLEEP_NO_DEPRECATE
            -D_CRT_TIME_FUNCTIONS_NO_DEPRECATE
            -D_CRT_VCCLRIT_NO_DEPRECATE
            -D_SCL_SECURE_NO_DEPRECATE
            )
        ENDIF(NOT ITK_ENABLE_VISUAL_STUDIO_DEPRECATED_C_WARNINGS)
      ENDIF(NOT MINGW)
    ENDIF(NOT CYGWIN)
  ENDIF(NOT BORLAND)
ENDIF(WIN32)

PROJECT(am_cut)
#FIND_PACKAGE(ITK)
#IF(ITK_FOUND)
#INCLUDE(${ITK_USE_FILE})
#ELSE(ITK_FOUND)
#MESSAGE(FATAL_ERROR
#"ITK not found. Please set ITK_DIR.")
#ENDIF(ITK_FOUND)

set(PROJECTNAME "am_cut")
ADD_EXECUTABLE(${PROJECTNAME} am_cut.cpp network.h)
TARGET_LINK_LIBRARIES(${PROJECTNAME} )
ADD_CUSTOM_COMMAND(TARGET ${PROJECTNAME} POST_BUILD COMMAND copy \"$(TargetPath)\" \"../bin/exec\")



